package net.wanho.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.RequiredArgsConstructor;
import net.wanho.mapper.StudentMapper;
import net.wanho.po.Student;
import net.wanho.service.StudentService;
import org.springframework.stereotype.Service;

/**
 * Author：汤小洋
 * Date：2023-07-27 15:24
 * Description：<描述>
 */
@Service
@RequiredArgsConstructor
public class StudentServiceImpl implements StudentService {

    private  final StudentMapper studentMapper;

    @Override
    public PageInfo<Student> findPage(int pagenum, int pagesize, Student student) {
        PageHelper.startPage(pagenum,pagesize);
        return new PageInfo<>(studentMapper.select(student));
    }
}
